const path = require('path');
const webpack = require('webpack');

module.exports = {
    entry: {
        idx: './src/idx.js'
    },
    output: {
        filename: '[name].[chunkHash].js',
        path: path.resolve(__dirname, './dist/'),
        chunkFilename: '[name].chunk.js'        
    },
    plugins: [
        new webpack.optimize.CommonsChunkPlugin({
            name: "common", 
            minChunks: 2
        })
    ]
}
